package components.socket
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IOErrorEvent;
	import flash.events.ProgressEvent;
	import flash.events.SecurityErrorEvent;
	import flash.net.Socket;

	[Event(name="close", type="flash.events.Event")]
	public class ClientSocket extends EventDispatcher
	{
		private var _socket:Socket;
		
		public function ClientSocket()
		{
			init();
		}
		
		private function init():void
		{
			_socket = new Socket();
			_socket.addEventListener( IOErrorEvent.IO_ERROR, onSocketError, false, 0, true );
			_socket.addEventListener( SecurityErrorEvent.SECURITY_ERROR, onSocketError, false, 0, true );
			_socket.addEventListener( ProgressEvent.SOCKET_DATA, onSocketData, false, 0, true );
		}
		
		public function connect( host:String, port:int ):void
		{
		}
		
		private function onSocketError( e:Event ):void
		{
		}
		
		private function onSocketData( e:ProgressEvent ):void
		{
			
		}
	}
}












